package com.kuaiyin.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.kuaiyin.sampling.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serial;
import java.io.Serializable;

/**
 * <p>
 * JMeter测试配置表
 * </p>
 *
 * @author ng
 * @since 2025-06-23
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName(value = "jmeter_test", autoResultMap = true)
@Schema(name = "JmeterTest", description = "JMeter测试配置表")
public class JmeterTest extends BaseEntity implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @Schema(description = "主键ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @Schema(description = "压测计划名称")
    private String name;

    @Schema(description = "关联测试计划ID")
    private Long planId;

    @Schema(description = "测试类型（SIMPLE/JMX）")
    private String type;

    @Schema(description = "压测备注")
    private String comment;

    @Schema(description = "线程组名称")
    private String threadGroupName;

    @Schema(description = "并发用户数")
    private Integer threads;

    @Schema(description = "启动时间（秒）")
    private Integer rampUp;

    @Schema(description = "循环次数（-1表示永远）")
    private Integer loops;

    @Schema(description = "是否使用调度器")
    private Boolean scheduler;

    @Schema(description = "持续时间（秒）")
    private Integer duration;

    @Schema(description = "延迟启动（秒）")
    private Integer delayedStart;

    @Schema(description = "JMX文件路径")
    private String filePath;

}
